<?php

namespace plugin\piecing\app\model;

use support\spark\BaseModel;

class PiecingActivity extends BaseModel
{

    const CREATED_AT = 'create_time';
    const UPDATED_AT = 'update_time';
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'piecing_activity';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * 活动商品
     */
    public function activityGoods()
    {
        return $this->hasMany(PiecingActivityGoods::class, 'activity_id', 'id');
    }
}